<?php
/**
 * 资讯查看
 * Class Index
 */
class NewController extends Controller{

	private $M_news;
    /**
     * 构造方法
     * 初始化
     */
    public function __construct(){
        $this->M_news = Model::getInstance('news');
    }
	
    public function index(){
		global $config_arr;

        $id = (int)$this->input()->get('id');
		
		$info = $this->M_news->get($id);
		
		if(empty($info)){
			Template::show('common/404.php');
			exit;
		}
		
		$data = array(
			'info'=>$info
		);

        Template::show('new/index.php', $data);
	}
}

?>